{extend name="common/layout"}
<!--注意，使用layout模板继承模式，内容须写在任意[block]标签对之间，否则内容不会被渲染-->

{block name="header"}
{include file="common/header"}
{/block}

{block name="style"}
<!--__style__-->
{/block}

{block name="main"}
{include file="common/navi"}
<div class="body">
    <div class="main-container">
        {content@get id="$id"}
    <!--单页(示例)-->
    <div class="main-content single">
        <div class="title">{$content.title}</div>
        <div class="content">{$content.content|raw}</div>
    </div>
<div id="container" style="width: 100%; height: 400px"></div>
    <script type="text/javascript" src="https://webapi.amap.com/maps?v=2.0&key=2f9ef1aff1d2dcf9d315ba08355079d2"></script>
    <script type="text/javascript">
        var position = new AMap.LngLat(102.656236, 25.0094);
        // 创建地图实例
        var map = new AMap.Map("container", {
            zoom: 13,
            center: position,
            resizeEnable: true
        });
        // 点标记显示内容，HTML要素字符串
        var markerContent = '' +
            '<div class="custom-content-marker">' +
            '   <img src="//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-red.png">' +
            '</div>';
        var marker = new AMap.Marker({
            position: position,
            // 将 html 传给 content
            content: markerContent,
            // 以 icon 的 [center bottom] 为原点
            offset: new AMap.Pixel(-13, -30)
        });
        // 将 markers 添加到地图
        map.add(marker);
    </script>
    </div>
</div>
{/block}

{block name="footer"}
{include file="common/footer"}
{/block}

{block name="script"}
<!--__script__-->
{/block}